package com.gxa.admin.recycling.controller;

import com.gxa.admin.recycling.service.RolePermissionService;
import com.gxa.core.recycling.common.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.spring.web.plugins.JacksonSerializerConvention;

import java.util.List;
import java.util.Map;

/**
 * @author R
 * @data 2021-12-02 15:48
 */
@RestController
@RequestMapping("/rolePermission")
public class RolePermissionController {

    @Autowired
    RolePermissionService service;

    @PostMapping("/insert")
    public Map insert(Integer rid, List<Integer> oids){
        service.insert(rid,oids);
        JsonResult jsonResult = new JsonResult();
        jsonResult.setCode("200");
        jsonResult.setMsg("添加成功");
        return jsonResult.getDataMap();
    }
}
